-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple the issue-template code from comment_tab.tmpl #23556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic seems to be the same.
Apart from the comment below, I see neither something that would hold this PR back, nor how that would be helpful for the issue you linked
@@ -28,7 +12,6 @@ | |||
{{.locale.Tr "loading"}} | |||
</div> | |||
</div> | |||
{{end}} | |||
{{if .IsAttachmentEnabled}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could also extract the lines below into its own subtemplate, so that we don't need to declare them twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My plan is introducing a "ComboEditor" for Gitea in the future, a ComboEditor could have: markdown toolbar, preview, textarea, dropzone(uploader).
So leave it to future.
It would make introducing the new editor easier. Otherwise if a lot of logics are mixed together, it's difficult to get clear refactoring. In my plan, the first step is making the "comment_tab.tmpl" use the new "ComboEditor", the "issue template" part is totally unrelated. And one more thing, the "issue template" part doesn't match the name "comment_tab.tmpl". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it follows the same logic, I would say yes if it could benefit another PR.
🎺 🤖 |
* upstream/main: Use a general approch to improve a11y for all checkboxes and dropdowns. (go-gitea#23542) [skip ci] Updated translations via Crowdin Update PR documentation (go-gitea#23620) Set opaque background on markup and images (go-gitea#23578) Decouple the issue-template code from comment_tab.tmpl (go-gitea#23556) Remove `id="comment-form"` dead code, fix tag (go-gitea#23555) Introduce path Clean/Join helper functions (go-gitea#23495) Remove conflicting CSS rules on notifications, improve notifications table (go-gitea#23565) Remove @metalmatze as maintainer (go-gitea#23612) Keep (add if not existing) xmlns attribute for generated SVG images (go-gitea#23410)
It would help #23290
The issue-template code is only useful for "new issue" or "new PR", so it could only be put in the
new_form.tmpl
@wolfogre how do you think?